Get Customer Offers
This API is used to retrieve a list of all customer offers that were created by the customer, identified by “customer/{id}” in the following URL, for the customer/{id}’s sub-customers.
|
HTTP URL |
|
|---|---|
|
GET |
/api/v2/customer/{id}/offer/created-offers |
Eligibility
The Requester is eligible to request information on offers that it created and that are available for attachment to sub-customers.
API Request
Request Structure
This API has no request structure.
API Response
Response Structure
|
Parameter |
Type |
M/O/CM |
Description |
|---|---|---|---|
|
errorCode |
String |
O |
Failure code. |
|
errorMessage |
String |
O |
Failure message. |
|
content |
Object |
O |
Array of main response body object displayed when an API call was successful. For a failure, it will be empty. |
|
pageable |
Object |
O |
Paging information object displayed when an API call was successful. For a failure, it will be empty. |
Content data objects
|
Element |
Type |
M/O/CM |
Description |
|---|---|---|---|
|
id |
UUID |
M |
Offer ID |
|
name |
String |
M |
Offer name |
|
description |
String |
O |
Offer description |
|
type |
String |
M |
Individual offer type. ENUM: RATE, MONEY, USAGE, POOL |
|
creationTime |
DateTime |
M |
Offer creation timestamp |
|
expirationTime |
DateTime |
O |
Offer expiration time |
|
renewalInterval |
String |
M |
Renewal period interval. ENUM valid values: DAILY, WEEKLY, MONTHLY, QUARTERLY, SEMI_ANNUALLY, ANNUALLY, ONE_TIME |
|
isProrated |
Boolean |
M |
Plan proration. True = Proration will be calculated when attaching this plan False = There is no proration A Pool plan is always False. |
|
money |
Object |
CM |
Money type object. Populated when a MONEY offer type is returned.. |
|
rate |
Object |
O |
Rate type object. Populated when a RATE offer type is returned |
|
usage |
Object |
CM |
Usage type object. Populated when a USAGE offer type is populated Empty if a RATE, MONEY or POOL offer type is returned |
|
pool |
Object |
CM |
Pool plan type object. Populated when a POOL offer type is returned Empty if any other offer type is returned (USAGE, RATE, MONEY). |
Money data objects
|
Element |
Type |
M/O/CM |
Description |
|---|---|---|---|
|
value |
Decimal |
M |
Offer monetary value |
|
currency |
String |
M |
Offer currency. For example: USD, GBP, EUR |
|
activationType |
String |
M |
Displays plan activation behavior. Valid values: REGULAR FIRSTEVENT_PERIODIC FIRST_EVENT_NON_PERIODIC |
Rate data objects
|
Element |
Type |
M/O/CM |
Description |
|---|---|---|---|
|
dataLimit |
Decimal |
O |
Displays the maximal allowed DATA usage consumption. |
|
dataLimitUnitType |
String |
CM |
Data limit unit type. Valid values: KB, MB, GB Populated when data limit exists. |
|
smsLimit |
Decimal |
O |
Displays the maximal allowed SMS usage consumption. Unit counting is always a ‘unit’. |
Usage data objects
|
Element |
Type |
M/O/CM |
Description |
|---|---|---|---|
|
cost |
Decimal |
M |
Cost of the offer |
|
currency |
String |
M |
Offer currency. For example., USD, GBP, EUR |
|
activationType |
String |
M |
Displays plan activation behavior. Valid values: REGULAR FIRSTEVENT_PERIODIC FIRST_EVENT_NON_PERIODIC |
|
offerDepletion |
Boolean |
CM |
Rater behavior when offer allowances were depleted. True = Charging will continue according to offer rate. False = Charging will be blocked For a Usage plan type, this attribute is always False. |
|
usageType |
Object |
M |
Array of usage types object. |
Usage Type data objects
|
Element |
Type |
M/O/CM |
Description |
|---|---|---|---|
|
type |
String |
M |
Type of the usage. Valid values: DATA, SMS |
|
value |
Decimal |
M |
Overall allowance value for regular offer or for FIXED-type Pool Plan. Allowance value per every added subscriber for ACCUMULATIVE-type Pool Plan. Data consumption for DATA type. Unit counting for SMS type. |
|
unitType |
String |
CM |
Usage unit type. DATA related valid values: KB, MB, GB. Populated when usage type is set to DATA. |
|
limitValue |
Decimal |
O |
Displays usage limit value of a ‘Pool’ plan type. Data consumption for DATA type: Unit counting for SMS type. |
|
limitUnitType |
String |
CM |
Data limit unit type. Valid values: KB, MB, GB Populated when setting limit for DATA usage only. |
Pool data objects
|
Element |
Type |
M/O/CM |
Description |
|---|---|---|---|
|
subAccountId |
UUID |
M |
UUID (Universal Unique ID) of the sub account for which the Pool Plan was created. No longer valid. Populated always with a ‘NULL’ string |
|
subAccount |
String |
M |
Name of the sub account for which the Pool Plan was created. No longer valid. Populated always with a ‘NULL’ string. |
|
type |
String |
M |
Pool plan type. Valid values: FIXED, ACCUMULATIVE |
|
cost |
Decimal |
M |
Cost of the offer for FIXED type. Cost that will be added per every added subscriber for ACCUMULATIVE type. |
|
currency |
String |
M |
Offer currency. For example, USD, GBP, EUR |
|
activationType |
String |
M |
Defines pool plan activation behavior. Valid values: REGULAR FIRSTEVENT_PERIODIC FIRST_EVENT_NON_PERIODIC |
|
usageType |
Object |
M |
Array of usage types object. |
Pageable data objects
|
Element |
Type |
M/O/CM |
Description |
|---|---|---|---|
|
page |
Numeric |
M |
Page number |
|
size |
Numeric |
M |
Page size. Number of requested elements per page |
|
totalPages |
Numeric |
M |
Total amount of available pages per requested page size |
|
totalElements |
Numeric |
M |
Total amount of retrieved elements |
Error Codes
In addition to the general success and failure codes, the following error codes are possible.
|
Code |
Message |
|---|---|
|
CUSTOMER_1002 |
Customer does not exist |
|
CUSTOMER_1006 |
Failed to retrieve customer details |
|
GLOBAL_1001 |
Service unavailable. Please try again |
Examples
Request Body
{
}
Response Body: Regular Plan (Money) Success ACK
{
"errorCode": "",
"errorMessage": "",
"content": [
{
"id": "e7fcef24-5c03-41dd-9e33-995b7d6f47a7",
"name": "roaming",
"description": "roaming bundle",
"type": "MONEY",
"creationTime": "2020-07-01T00:00:00.977Z",
"expirationTime": "2020-07-31T00:59:09.977Z",
"renewalInterval": "MONTHLY",
"isProrated": true,
"money": [
{
"value": 300,
"currency": "USD",
"activationType": "REGULAR"
}
]
},
{
"id": "ff74dca6-8e7f-4b85-a42b-13860913b370",
"name": "regular",
"description": "regular bundle",
"type": "MONEY",
"creationTime": "2020-07-01T00:00:00.977Z",
"expirationTime": "2020-07-31T00:59:09.977Z",
"renewalInterval": "MONTHLY",
"money": [
{
"value": 100,
"currency": "GBP",
"activationType": "REGULAR"
}
]
}
],
"pageable": {
"page": 1,
"size": 10,
"totalPages": 1,
"totalElements": 2
}}
Response Body: Pool Plan Success ACK
{
"errorCode": "",
"errorMessage": "",
"content": [
{
"id": "e7fcef24-5c03-41dd-9e33-995b7d6f47a7",
"name": "family 50GB+",
"description": "family bundle",
"type": "POOL",
"creationTime": "2020-07-01T00:00:00.977Z",
"expirationTime": "2020-07-31T00:59:09.977Z",
"renewalInterval": "MONTHLY",
"isProrated": false,
"pool": [
{
"subAccountId": "e7fcef24-5c03-41dd-9e33-995b7d6f47a7",
"subAccount": "Gualas LTD.",
"type": "FIXED",
"cost": 15,
"currency": "USD",
"activationType": "REGULAR",
"usageType": [
{
"type": "DATA",
"value": 50,
"unitType": "GB",
"limitValue": 20,
"limitUnitType": "GB"
},
{
"type": "SMS",
"value": 100,
"unitType": "",
"limitValue": 10,
"limitUnitType": ""
}
]
}
]
}
],
"pageable": {
"page": 1,
"size": 10,
"totalPages": 1,
"totalElements": 2
}
}
Response Body: Failure NAK
{
"errorCode": "GLOBAL_1001",
"errorMessage": "Service unavailable. Please try again",
"content": "",
"pageable": ""
}